﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace DotNET4Study
{
    class DateTimeFormatStudy
    {
        public static void Execute()
        {
            string dateTimeString = "23/9/2011";

            CultureInfo cultureInfo = new CultureInfo("en-AU");
            DateTimeFormatInfo dtfi= cultureInfo.DateTimeFormat;
            //dtfi.ShortDatePattern = "dd/MM/yyyy";
            DateTime birthDay = DateTime.MinValue;
            DateTime.TryParse(dateTimeString,cultureInfo,DateTimeStyles.None,out birthDay);
            Console.WriteLine( dtfi.ShortDatePattern);
            Console.WriteLine(birthDay.ToString());
        }
    }
}
